# -*- coding: utf-8 -*-

# Form implementation generated from reading ui file 'pychonform.ui'
#
# Created: mar sep 4 00:57:51 2007
#      by: The PyQt User Interface Compiler (pyuic) 3.17.1
#
# WARNING! All changes made in this file will be lost!


from qt import *

image0_data = \
    "\x89\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d" \
    "\x49\x48\x44\x52\x00\x00\x00\x16\x00\x00\x00\x16" \
    "\x08\x06\x00\x00\x00\xc4\xb4\x6c\x3b\x00\x00\x00" \
    "\x74\x49\x44\x41\x54\x38\x8d\xed\xd5\xc1\x09\xc0" \
    "\x20\x0c\x05\xd0\x6f\xe9\x36\x81\x2c\x10\xb2\xff" \
    "\xdd\x85\xd2\x53\x85\xb6\xa9\x91\x48\x0f\x05\x3f" \
    "\x08\x1a\xf0\x29\x12\x10\xf8\x28\xc5\xa9\xd9\xc4" \
    "\xde\x96\xcd\x2b\x9a\xd9\xeb\x00\x00\x66\x0e\x2f" \
    "\xe0\xc2\x51\x98\x39\xc4\xf7\x0c\x4c\x44\x6d\x5e" \
    "\x6b\x35\x38\xcf\x92\x82\x45\xe4\xb2\xf6\xf0\x14" \
    "\xac\xaa\x8f\xda\x1d\x4f\xc1\xa5\x74\x1b\x22\x07" \
    "\x9f\x9d\x11\x1d\x96\xea\x8a\x91\x2c\x78\xc1\x0b" \
    "\xee\x64\xe6\x07\x19\xf5\x7e\x92\x03\xad\x45\x2a" \
    "\x04\xcc\x4e\x50\x20\x00\x00\x00\x00\x49\x45\x4e" \
    "\x44\xae\x42\x60\x82"

class PychonForm(QMainWindow):
    def __init__(self,parent = None,name = None,fl = 0):
        QMainWindow.__init__(self,parent,name,fl)
        self.statusBar()

        self.image0 = QPixmap()
        self.image0.loadFromData(image0_data,"PNG")
        if not name:
            self.setName("PychonForm")


        self.setCentralWidget(QWidget(self,"qt_central_widget"))

        self.groupBox1 = QGroupBox(self.centralWidget(),"groupBox1")
        self.groupBox1.setGeometry(QRect(0,140,430,120))

        self.card1 = QPushButton(self.groupBox1,"card1")
        self.card1.setGeometry(QRect(10,20,50,91))

        self.card2 = QPushButton(self.groupBox1,"card2")
        self.card2.setGeometry(QRect(70,20,50,91))

        self.card3 = QPushButton(self.groupBox1,"card3")
        self.card3.setGeometry(QRect(130,20,50,91))

        self.card4 = QPushButton(self.groupBox1,"card4")
        self.card4.setGeometry(QRect(190,20,50,91))

        self.card5 = QPushButton(self.groupBox1,"card5")
        self.card5.setGeometry(QRect(250,20,50,91))

        self.card6 = QPushButton(self.groupBox1,"card6")
        self.card6.setGeometry(QRect(310,20,50,91))

        self.card7 = QPushButton(self.groupBox1,"card7")
        self.card7.setGeometry(QRect(370,20,50,91))

        self.deck = QPushButton(self.centralWidget(),"deck")
        self.deck.setGeometry(QRect(180,10,50,91))

        self.stack = QPushButton(self.centralWidget(),"stack")
        self.stack.setGeometry(QRect(240,10,50,91))

        self.fileNewAction = QAction(self,"fileNewAction")
        self.fileNewAction.setIconSet(QIconSet(self.image0))
        self.fileExitAction = QAction(self,"fileExitAction")
        self.helpAboutAction = QAction(self,"helpAboutAction")




        self.MenuBar = QMenuBar(self,"MenuBar")


        self.fileMenu = QPopupMenu(self)
        self.fileNewAction.addTo(self.fileMenu)
        self.fileMenu.insertSeparator()
        self.fileExitAction.addTo(self.fileMenu)
        self.MenuBar.insertItem(QString(""),self.fileMenu,1)

        self.helpMenu = QPopupMenu(self)
        self.helpAboutAction.addTo(self.helpMenu)
        self.MenuBar.insertItem(QString(""),self.helpMenu,2)


        self.languageChange()

        self.resize(QSize(432,314).expandedTo(self.minimumSizeHint()))
        self.clearWState(Qt.WState_Polished)

        self.connect(self.fileNewAction,SIGNAL("activated()"),self.fileNew)
        self.connect(self.fileExitAction,SIGNAL("activated()"),self.fileExit)
        self.connect(self.helpAboutAction,SIGNAL("activated()"),self.helpAbout)
        self.connect(self.deck,SIGNAL("clicked()"),self.deck_clicked)
        self.connect(self.stack,SIGNAL("clicked()"),self.stack_clicked)
        self.connect(self.card1,SIGNAL("clicked()"),self.card1_clicked)
        self.connect(self.card2,SIGNAL("clicked()"),self.card2_clicked)
        self.connect(self.card3,SIGNAL("clicked()"),self.card3_clicked)
        self.connect(self.card4,SIGNAL("clicked()"),self.card4_clicked)
        self.connect(self.card5,SIGNAL("clicked()"),self.card5_clicked)
        self.connect(self.card6,SIGNAL("clicked()"),self.card6_clicked)
        self.connect(self.card7,SIGNAL("clicked()"),self.card7_clicked)


    def languageChange(self):
        self.setCaption(self.__tr("Pychon"))
        self.groupBox1.setTitle(self.__tr("Hand"))
        self.card1.setText(self.__tr("Card 1"))
        self.card2.setText(self.__tr("Card 2"))
        self.card3.setText(self.__tr("Card 3"))
        self.card4.setText(self.__tr("Card 4"))
        self.card5.setText(self.__tr("Card 5"))
        self.card6.setText(self.__tr("Card 6"))
        self.card7.setText(self.__tr("Card 7"))
        self.deck.setText(self.__tr("Deck"))
        self.stack.setText(self.__tr("Stack"))
        self.fileNewAction.setText(self.__tr("New"))
        self.fileNewAction.setMenuText(self.__tr("&New"))
        self.fileNewAction.setAccel(self.__tr("Ctrl+N"))
        self.fileExitAction.setText(self.__tr("Exit"))
        self.fileExitAction.setMenuText(self.__tr("E&xit"))
        self.fileExitAction.setAccel(QString.null)
        self.helpAboutAction.setText(self.__tr("About..."))
        self.helpAboutAction.setMenuText(self.__tr("About..."))
        if self.MenuBar.findItem(1):
            self.MenuBar.findItem(1).setText(self.__tr("&File"))
        if self.MenuBar.findItem(2):
            self.MenuBar.findItem(2).setText(self.__tr("&Help"))


    def fileNew(self):
        print "PychonForm.fileNew(): Not implemented yet"

    def fileExit(self):
          import sys
          sys.exit()
        

    def helpAbout(self):
          from gui.aboutdialog import AboutDialog
          about = AboutDialog()
          about.show()
        

    def setHandCard(self,a0,a1):
          if pos == 0:
            card1.setText(text);
          elif pos == 1:
            card2.setText(text);
          elif pos == 2:
            card3.setText(text);
          elif pos == 3:
            card4.setText(text);
          elif pos == 4:
            card5.setText(text);
          elif pos == 5:
            card6.setText(text);
          elif pos == 6:
            card7.setText(text);
        

    def setStackCard(self,a0):
          stack.setText(text);
        

    def deck_clicked(self):
        print "PychonForm.deck_clicked(): Not implemented yet"

    def stack_clicked(self):
        print "PychonForm.stack_clicked(): Not implemented yet"

    def card1_clicked(self):
        print "PychonForm.card1_clicked(): Not implemented yet"

    def card2_clicked(self):
        print "PychonForm.card2_clicked(): Not implemented yet"

    def card3_clicked(self):
        print "PychonForm.card3_clicked(): Not implemented yet"

    def card4_clicked(self):
        print "PychonForm.card4_clicked(): Not implemented yet"

    def card5_clicked(self):
        print "PychonForm.card5_clicked(): Not implemented yet"

    def card6_clicked(self):
        print "PychonForm.card6_clicked(): Not implemented yet"

    def card7_clicked(self):
        print "PychonForm.card7_clicked(): Not implemented yet"

    def __tr(self,s,c = None):
        return qApp.translate("PychonForm",s,c)
